/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mbos.entities;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;

/**
 *
 * @author mier
 */
@Entity
@Table(name="item")
public class Item implements Serializable{
  private static final long serialVersionUID = 1l;
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(name = "id", nullable = false)
  private Integer id;
  @NotNull
  @Column(name="name", nullable = false)
  private String name;
  @NotNull
  @Column(name="description", nullable = false)
  private String description;
  @NotNull
  @Column(name="price", nullable = false)
  private double price;
  @NotNull
  @Column(name="unit_measuer", nullable = false)
  private String unitMeasure;
  @NotNull
  @Column(name="qty_on_hand", nullable = false)
  private int qtyOnHand;
  @NotNull
  @Column(name="reorder_point", nullable = false)
  private double reorderPoint;
  @Column(name="qty_ordered")
  private int qtyOrdered;
  @Column(name="categories", nullable = false)
  private String categories;
  @Column(name="date_created")
  @Temporal(TemporalType.DATE)
  private Date dateCreated;
  @Column(name="status")
  private short status;
  @Column(name="dflg")
  private short dFlg;

  public Integer getId() {
    return id;
  }

  public void setId(Integer id) {
    this.id = id;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getDescription() {
    return description;
  }

  public void setDescription(String description) {
    this.description = description;
  }

  public double getPrice() {
    return price;
  }

  public void setPrice(double price) {
    this.price = price;
  }

  public String getUnitMeasure() {
    return unitMeasure;
  }

  public void setUnitMeasure(String unitMeasure) {
    this.unitMeasure = unitMeasure;
  }

  public int getQtyOnHand() {
    return qtyOnHand;
  }

  public void setQtyOnHand(int qtyOnHand) {
    this.qtyOnHand = qtyOnHand;
  }

  public double getReorderPoint() {
    return reorderPoint;
  }

  public void setReorderPoint(double reorderPoint) {
    this.reorderPoint = reorderPoint;
  }

  public int getQtyOrdered() {
    return qtyOrdered;
  }

  public void setQtyOrdered(int qtyOrdered) {
    this.qtyOrdered = qtyOrdered;
  }

  public String getCategories() {
    return categories;
  }

  public void setCategories(String categories) {
    this.categories = categories;
  }

  public Date getDateCreated() {
    return dateCreated;
  }

  public void setDateCreated(Date dateCreated) {
    this.dateCreated = dateCreated;
  }

  public short getStatus() {
    return status;
  }

  public void setStatus(short status) {
    this.status = status;
  }

  public short getdFlg() {
    return dFlg;
  }

  public void setdFlg(short dFlg) {
    this.dFlg = dFlg;
  }
  
  @Override
  public String toString(){
    return this.name;
  }
  
}
